package com.lsu.app.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * 用户兴趣标签
 * @Date 2023-10-23 20:02:45
 * @author hjj
 */
@Data
@TableName("user_taste")
@ApiModel(value="UserTaste对象", description="用户兴趣标签")
public class UserTaste implements Serializable {

    @NotNull(message="[]不能为空")
    @ApiModelProperty("")
    private Integer id;

    @ApiModelProperty("用户id")
    private Integer userId;

    @JsonIgnore //数据库中不会输出该字段到json中
    @ApiModelProperty("类型对应值")
    private Integer tasteValueId;

    @NotBlank(message="[名称]不能为空")
    @Size(max= 64,message="编码长度不能超过64")
    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("更新时间")
    private String updateTime;
    public UserTaste(){}

    public UserTaste(Integer userId, String name,Integer tasteValueId) {
        this.userId = userId;
        this.name = name;
        this.updateTime= LocalDateTime.now().toString();
        this.tasteValueId=tasteValueId;
    }
}
